package com.yuandian.api.customer_perception.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 类说明: 告警详情列表和分布信息 vo
 *
 * @Date 2021/8/25 14:27
 * @Author User
 */
@Getter
@Setter
@ToString
@HeadRowHeight(40)
public class ReturnCodeDetailVo {
    /**
     * 序号
     */
    private Integer id;

    /**
     * 系统ID
     */
    @ExcelIgnore
    private Integer systemId;

    /**
     * 系统名称
     */
    private String systemName;

    /**
     * 业务编码
     */
    @ExcelIgnore
    private String businessCode;

    /**
     * 业务名称
     */
    private String businessName;

    /**
     * 告警级别
     */
    @ExcelIgnore
    private Integer alarmLevel;

    private String alarmName;

    /**
     * 告警返回码
     */
    private String alarmResultCode;

    /**
     * 告警发生时间
     */
    private String alarmTriggerTime;

    /**
     * 告警描述
     */
    private String alarmContext;

    public void handleAlarmName () {
        if (null != alarmLevel) {
            switch (alarmLevel) {
                case 1:
                    alarmName = "提示";
                    break;
                case 2:
                    alarmName = "一般";
                    break;
                case 3:
                    alarmName = "紧急";
                    break;
                case 4:
                    alarmName = "重大";
                    break;
                case 5:
                    alarmName = "正常";
                    break;
                default:
                    alarmName = "正常";
            }
        }
    }
}
